'\"macro stdmacro
.\"
.\" Copyright (c) 2013-2019 Red Hat.
.\" Copyright (c) 2000 Silicon Graphics, Inc.  All Rights Reserved.
.\"
.\" This program is free software; you can redistribute it and/or modify it
.\" under the terms of the GNU General Public License as published by the
.\" Free Software Foundation; either version 2 of the License, or (at your
.\" option) any later version.
.\"
.\" This program is distributed in the hope that it will be useful, but
.\" WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
.\" or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
.\" for more details.
.\"
.TH PMLOGGER_REWRITE 1 "PCP" "Performance Co-Pilot"
.SH NAME
\f3pmlogger_rewrite\f1 \- helper script to rewrite Performance Co-Pilot archives
.SH SYNOPSIS
.B $PCP_BINADM_DIR/pmlogger_rewrite
[\f3\-dNsVvw?\f1]
[\f3\-c\f1 \f2config\f1]
\f2archive\f1 ...
.SH DESCRIPTION
.B pmlogger_rewrite
is a helper script that is used by
.BR pmlogger_daily (1)
when rewriting Performance Co-Pilot (PCP)
archives.
Rewriting is usually required to accommodate evolutionary changes in metadata
so old archives can be updated and then merged with current archives.
.PP
.B pmlogger_rewrite
is a wrapper script for
.BR pmlogrewrite (1)
that will potentially rewrite all of the archives matching the
.I archive
arguments.
Each
.I archive
argument may be a PCP archive file name, the basename for
the files in a PCP archive, or a directory (in which
case all subordinate PCP archives are found by recursive
descent).
.PP
.B pmlogrewrite
is run with the
.B \-i
option so rewriting is done ``in place''.
The
.B \-q
option is also used, so if no rewriting is required then no changes are made
to the archive files.
.SH OPTIONS
The following options are passed through to
.BR pmlogrewrite :
.hy 0
.B \-c
(or
.BR \-\-config ),
.B \-d
(or
.BR \-\-desperate ),
.B \-s
(or
.BR \-\-scale ),
.B \-v
(or
.B \-\-verbose)
and
.B \-w
(or
.BR \-\-warnings ).
Refer to
.BR pmlogrewrite (1)
for the meaning of these options.
.br
.hy
.PP
The remaining options are:
.TP 5
\fB\-N\fR, \fB\-\-showme\fR
Runs
.B pmlogger_rewrite
in a ``show me'' or ``dry run'' mode where the
tasks that would be performed are reported, but no changes are made.
This is typically used for debugging in combination with one (verbose)
or two (very verbose)
.B \-V
options.
.TP
\fB\-V\fR, \fB\-\-verbose\fR
Increase script output verbosity.
.TP
\fB\-?\fR, \fB\-\-help\fR
Display usage message and exit.
.SH PCP ENVIRONMENT
Environment variables with the prefix \fBPCP_\fP are used to parameterize
the file and directory names used by PCP.
On each installation, the
file \fI/etc/pcp.conf\fP contains the local values for these variables.
The \fB$PCP_CONF\fP variable may be used to specify an alternative
configuration file, as described in \fBpcp.conf\fP(5).
.SH SEE ALSO
.BR PCPIntro (1),
.BR pmlogger (1),
.BR pmlogger_daily (1)
and
.BR pmlogrewrite (1).
